package com.beyond.market.record.service.impl;

import com.beyond.market.record.dao.RecordMapper;
import com.beyond.market.record.domain.Record;
import com.beyond.market.record.service.RecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.SQLException;
import java.util.List;

@Service
public class RecordServiceImpl implements RecordService {

    @Autowired(required = false)
    private RecordMapper recordMapper;

    @Override
    public List<Record> listByUserId(Integer id) throws SQLException {
        return recordMapper.listByUserId(id);
    }
    @Override
    public int save(Record record) throws SQLException {
        return recordMapper.save(record);
    }
    @Override
    public Record getRecordByPrimaryKey(Integer id) throws SQLException {
        return recordMapper.getRecordByPrimaryKey(id);
    }

    @Override
    public int remove(Integer id) throws SQLException {
        return recordMapper.remove(id);
    }

}
